<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
  <title>Geeklog Documentation - Calendar Plugin</title>
  <link rel="stylesheet" type="text/css" href="../docstyle.css" title="Dev Stylesheet">
</head>

<body>
<p><a href="http://www.geeklog.net/" style="background:transparent"><img src="../images/newlogo.gif" alt="Geeklog" width="243" height="90"></a></p>
<div class="menu"><a href="index.html">Geeklog Documentation</a> - Calendar Plugin</div>

<h1>Calendar Plugin</h1>

<p>Events and the calendar used to be an integral part of the Geeklog core code,
but have been moved to a plugin as of Geeklog 1.4.1.</p>

<h2><a name="config.php">Configuration</a></h2>

<p>The calendar's configuration can be changed from the Configuration admin
panel:</p>

<h3><a name="general">General Calendar Settings</a></h3>

<table>
<tr><th style="width:25%">Variable</th>
    <th style="width:25%">Default Value</th>
    <th style="width:50%">Description</th>
</tr>
<tr>
  <td><a name="desc_calendarloginrequired">calendarloginrequired</a></td>
  <td>0</td>
  <td>When set to 1, only registered users can access the calendar<br>
    Please note that <code>$_CONF['<a
    href="config.html#desc_loginrequired">loginrequired</a>']</code> in
    Geeklog's main configuration takes precedence over this setting. So when
    <code>'loginrequired'</code> is set to 1, anonymous users can not access
    the calendar even when <code>'calendarloginrequired'</code> is set
    to 0.</td>
</tr>
<tr class="r2">
  <td><a name="desc_hidecalendarmenu">hidecalendarmenu</a></td>
  <td>0</td>
  <td>Whether to hide the "Calendar" entry from Geeklog's menu bar (when set to
    1) or to show it (when set to 0).</td>
</tr>
<tr>
  <td><a name="desc_personalcalendars">personalcalendars</a></td>
  <td>0</td>
  <td>Allow account holders to have a personal calendar</td>
</tr>
<tr class="r2">
  <td><a name="desc_eventsubmission">eventsubmission</a></td>
  <td>1</td>
  <td>Whether events submitted by users will have to be approved by an admin
    first (when set = 1) or show up immediately (when set = 0).</td>
</tr>
<tr>
  <td><a name="desc_showupcomingevents">showupcomingevents</a></td>
  <td>1</td>
  <td>Whether to show upcoming events (0 = no, 1 = yes) in a separate
    block.</td>
</tr>
<tr class="r2">
  <td><a name="desc_upcomingeventsrange">upcomingeventsrange</a></td>
  <td>14</td>
  <td>Number of days that the &quot;Upcoming Events&quot; block will look
    ahead.</td>
</tr>
<tr>
  <td><a name="desc_hour_mode">hour_mode</a></td>
  <td>12</td>
  <td>Which format to use when submitting or editing an event. Can be 12 (for
    the 12 hours am/pm format) or 24 (for the 24 hours format).<br>
    Uses the same value as <a
    href="config.html#desc_hour_mode">$_CONF['hour_mode']</a> by default.</td>
</tr>
<tr class="r2">
  <td><a name="desc_event_types">event_types</a></td>
  <td>Anniversary, Appointment, Birthday, Business, Education, Holiday, Meeting, Miscellaneous, Personal, Phone Call, Special Occasion, Travel, Vacation</td>
  <td>The set of event types that are used both on the public calendar and the
    user's personal calendar.</td>
</tr>
<tr>
  <td><a name="desc_notification">notification</a></td>
  <td>0</td>
  <td>Whether to send an email notification when a new event was submitted for
    the site's calendar (when set to = 1) or not (when set to = 0).<br>
    No notification is ever sent for events in personal calendars.</td>
</tr>
<tr class="r2">
  <td><a name="desc_delete_event">delete_event</a></td>
  <td>0</td>
  <td>Defines what to do when a user is deleted that is the owner of an event.
    When set to 0, all events owned by the deleted user will be assigned to a
    user of the "Root" group (e.g. the site admin). When set to 1, the events
    are deleted. This only applies to site events - a user's personal events
    are always deleted.</td>
</tr>
<tr>
  <td><a name="desc_aftersave">aftersave</a></td>
  <td>'list'</td>
  <td>Which page to go to after an event has been saved:
    <ul>
    <li>'item': display the event details</li>
    <li>'list': show admin's list of events (default)</li>
    <li>'plugin': display the calendar</li>
    <li>'home': display the site's homepage</li>
    <li>'admin': go to the "Admin Home" page, i.e. Command &amp; Control</li>
    </ul></td>
</tr>
</table>

<h3><a name="whatsnew">Events Block</a></h3>

<table>
<tr><th style="width:25%">Variable</th>
    <th style="width:25%">Default Value</th>
    <th style="width:50%">Description</th>
</tr>
<tr>
  <td valign="top"><a name="desc_block_enable">block_enable</a></td>
  <td valign="top">true</td>
  <td valign="top">Enable block.</td></tr>
<tr class="r2">
  <td valign="top"><a name="desc_block_isleft">block_isleft</a></td>
  <td valign="top">1</td>
  <td valign="top">Whether to display the block on the left (when set to 1)
    or right (when set to 0).</td></tr>
<tr>
  <td valign="top"><a name="desc_block_order">block_order</a></td>
  <td valign="top">50</td>
  <td valign="top">The order the block appears in the column.</td></tr>
<tr>
  <td valign="top"><a name="desc_block_topic_option">block_topic_option</a></td>
  <td valign="top">'all'</td>
  <td valign="top">Set to 'All' for block to appear on all pages. Set to 'Homepage Only' for block to appear on just the homepage. Set to 'Selected Topics' for block to appear only in Topics selected in the Topic setting.</td></tr>
<tr>
  <td valign="top"><a name="desc_block_topic">block_topic</a></td>
  <td valign="top"></td>
  <td valign="top">The topics the block will appear for if the Topic Options is set to 'Select Topics'.</td></tr>
<tr>
  <td valign="top"><a name="desc_block_group_id">block_group_id</a></td>
  <td valign="top">Calendar Admin</td>
  <td valign="top">The group used by permissions.</td></tr>
</table>

<h2><a name="others">Other Options</a></h2>

<p>Please note that some of the options from Geeklog's main configuration
are also relevant for the calendar plugin:</p>
<ul>
<li>Times and dates are formatted according to the current language and the
    <a href="config.html#languages_locale">locale settings</a> from Geeklog's
    main configuration.</li>
</ul>


<h2><a name="autotags">Autotags</a></h2>

<p>The Calendar Plugin provides one <a href="http://www.geeklog.net/article.php/autolinks" title="geeklog.net: About Autolinks and Autotags">autotag</a>,
<code>[event:]</code>. You can use this autotag to link to an event in the
calendar without having to type out the URL. Simply add the event's ID after
the colon. It will then create a link to that event and use the event's title
as the link text. Alternatively, you can add your own link text after the ID
(but before the closing bracket).</p>

<p>For example, on geeklog.net:</p>
<ul>
<li><code>[event:20090805065311513]</code> will be translated to: <code>&lt;a href="http://www.geeklog.net/calendar/event.php?eid=20090805065311513"&gt;FrOSCon - Free and Open Source Software Conference&lt;/a&gt;</code></li>
<li><code>[event:20090805065311513 FrOSCon 2009]</code> will be translated to: <code>&lt;a href="http://www.geeklog.net/calendar/event.php?eid=20090805065311513"&gt;FrOSCon 2009&lt;/a&gt;</code></li>
</ul>


<div class="footer">
    <a href="http://wiki.geeklog.net/">The Geeklog Documentation Project</a><br>
    All trademarks and copyrights on this page are owned by their respective owners. Geeklog is copyleft.
</div>

</body>
</html>
